package com.ai.service.made;

import com.ai.common.CommonResponse;

import com.ai.entity.alarm.AlgorithmAlarmBO;
import com.ai.entity.alarm.RecordAlarmBO;
import com.ai.entity.alarm.RecordAlarmPO;
import com.ai.entity.alarm.RecordAlarmPage;
import com.ai.model.made.RegionalViolationDto;
import com.ai.model.made.TopFiveViolationsDto;
import com.ai.model.param.AlgorithmAlarmParam;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Mr.Chen
 * @since 2020-06-19
 */
public interface RecordAlarmService extends IService<RecordAlarmPO> {


    /**
     * 算法提交识别警告----弃用
     *
     * @return
     */
    CommonResponse addAlarm(List<AlgorithmAlarmBO> algorithmAlarmBO);

    /**
     * 持久化算法发送的告警记录
     * @param algorithmAlarmParams 算法入参
     * @return
     */
    CommonResponse addWarningRecord(AlgorithmAlarmParam algorithmAlarmParams);

    /**
     * 识别警告列表
     *
     * @return
     */
    CommonResponse selectByPage(RecordAlarmPage page);

    /**
     * 是否误报
     *
     * @param recordAlarmBO
     * @return
     */
    CommonResponse signError(RecordAlarmBO recordAlarmBO);

    List<RecordAlarmPO> getRecordByCameraCodeAndFunType(ArrayList<String> cameraCode, String funType);

    List<TopFiveViolationsDto> topFiveViolations();


    List<RegionalViolationDto> regionalViolation();

    CommonResponse latestRecord();

    /**
     * 获取视频回放地址
     * @param recordId
     * @return
     */
    CommonResponse getCameraPlaybackUrl(String recordId);
}
